import { post, get } from "@/utils/request";

/**
 * @description: 获取图片验证码
 * @return {*}
 */
export function preOrder() {
  return post({
    url: "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi",
  });
}
/**
 * @description 支付
 * @param {*} data
 * @returns
 */
export function getWechatPay(data) {
  return post({
    url: "/pay/wxMiniJsapiPay",
    data,
  });
}


/**
 * 查询优惠码是否存在
 * @param {*} code 优惠码
 * @returns 会员等级相关信息
 */
export function getLevelByChannelCode(code) {
  return get({
    url: `/member/getLevelByChannelCode?code=${code}`,
  })
}

